package com.xmtlxx.oms.mapper;

import com.xmtlxx.common.annotation.DataColumn;
import com.xmtlxx.common.annotation.DataPermission;
import com.xmtlxx.oms.domain.TaskDisposalInfo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xmtlxx.oms.domain.bo.AuthCenterDisposalBo;

import java.util.List;

/**
 * 处置任务信息Mapper接口
 *
 * @author hergreen
 * @description 针对表【T_TASK_DISPOSAL_INFO(处置任务信息)】的数据库操作Mapper
 * @createDate 2024-07-24 15:22:13
 * @Entity TaskDisposalInfo
 */
public interface TaskDisposalInfoMapper extends BaseMapper<TaskDisposalInfo> {

    /**
     * 获取任务处置信息
     *
     * @param taskId 任务id
     * @return TaskDisposalInfo
     * @author hergreen
     * @date 2024/08/02 16:19
     */
    default TaskDisposalInfo getDisposalInfo(String taskId) {

        return this.selectOne(new LambdaQueryWrapper<TaskDisposalInfo>()
                .eq(TaskDisposalInfo::getTaskId, taskId));
    }

    @DataPermission({
            @DataColumn(key = "deptName", value = "t.dept_id")
    })
    List<AuthCenterDisposalBo> getAuthCenterDisposalList();
}




